/**
 *@auther: tang
 *@Date: 2021-03-01
 *Project: p2p-finance-manage-system
 */
import { axios } from "@/main";

const url = "/markApi/finance/dictionary";
// 借款人列表
export async function loanUserList(params) {
  return new Promise((resolve, reject) => {
    axios
      .get(`${url}/loanUserList`, params)
      .then(res => {
        resolve(res);
      })
      .catch(err => {
        reject(err);
      });
  });
}
// 资金用途
export async function fundsUsages(params) {
  return new Promise((resolve, reject) => {
    axios
      .get(`${url}/fundsUsages`, params)
      .then(res => {
        resolve(res);
      })
      .catch(err => {
        reject(err);
      });
  });
}
// 风险等级列表
export async function riskLevels(params) {
  return new Promise((resolve, reject) => {
    axios
      .get(`${url}/riskLevels`, params)
      .then(res => {
        resolve(res);
      })
      .catch(err => {
        reject(err);
      });
  });
}
// 还款方式
export async function repaymentMethods(params) {
  return new Promise((resolve, reject) => {
    axios
      .get(`${url}/repaymentMethods`, params)
      .then(res => {
        resolve(res);
      })
      .catch(err => {
        reject(err);
      });
  });
}

// 借款类型列表
export async function debitTypeList(params) {
  return new Promise((resolve, reject) => {
    axios
      .get(`${url}/debitTypeList`, params)
      .then(res => {
        resolve(res);
      })
      .catch(err => {
        reject(err);
      });
  });
}

// 担保机构列表
export async function guaranteeList(params) {
  return new Promise((resolve, reject) => {
    axios
      .get(`${url}/guaranteeList`, params)
      .then(res => {
        resolve(res);
      })
      .catch(err => {
        reject(err);
      });
  });
}

// 抵押类型
export async function pledgeTypeList(params) {
  return new Promise((resolve, reject) => {
    axios
      .get(`${url}/pledgeList`, params)
      .then(res => {
        resolve(res);
      })
      .catch(err => {
        reject(err);
      });
  });
}

// 标签列表
export async function labelList(params) {
  return new Promise((resolve, reject) => {
    axios
      .get(`${url}/labelList`, params)
      .then(res => {
        resolve(res);
      })
      .catch(err => {
        reject(err);
      });
  });
}

// 标签类型列表
export async function labelTypeList(params) {
  return new Promise((resolve, reject) => {
    axios
      .get(`${url}/labelTypeList`, params)
      .then(res => {
        resolve(res);
      })
      .catch(err => {
        reject(err);
      });
  });
}

// 递增金额列表
export async function addMoneyList(params) {
  return new Promise((resolve, reject) => {
    axios
      .get(`${url}/addMoneyList`, params)
      .then(res => {
        resolve(res);
      })
      .catch(err => {
        reject(err);
      });
  });
}

// 状态列表
export async function stateList(params) {
  return new Promise((resolve, reject) => {
    axios
      .get(`${url}/stateList`, params)
      .then(res => {
        resolve(res);
      })
      .catch(err => {
        reject(err);
      });
  });
}
